#bin  bash
ip link set eno1 down


ip link add name br0 type bridge



ip link set eno1 master br0



ip link set up dev br0


ip addr add 172.25.121.182/16 dev br0

设置默认网关 (如果需要):

ip route add default via 172.25.0.1

创建 VLAN 接口 (假设 VLAN 标签为 31):

ip link add link eno1 name eno1.31 type vlan id 31

启动 VLAN 接口:

ip link set up dev eno1.31

将 VLAN 接口添加到网桥 (如果需要):

ip link set eno1.31 master br0

重新启用物理接口 (如果之前已禁用):

ip link set eno1 up

检查网络配置:

ip addr ip link show ip route show